package com.maven.controller;

import com.maven.model.User;
import com.maven.reset.WSRequestResult;
import com.maven.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by 毕文涛 on 2017-08-11.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/getUserById",method = RequestMethod.POST)
    @ResponseBody
    public WSRequestResult getUserById(Integer userId){
        return userService.getUserById(userId);
    }
}
